package com.kuang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class RestFulController {


    //http://localhost:8080/springmvc_04_controller_war_exploded/add?a=1&b=2
    @RequestMapping("/add")
    public String test1(int a,int b,Model model){
        int res=a+b;
        model.addAttribute("msg",a+"+"+b+"="+res);
        return "test";
    }
}
